﻿namespace FormStateKeeper
{
    /// <summary>
    /// This interface defines a storage provider for form state.
    /// </summary>
    public interface IFormStateStorageProvider
    {
        /// <summary>
        /// Stores the supplied form state.
        /// </summary>
        /// <param name="formState">The form state to store.</param>
        void Store(FormState formState);

        /// <summary>
        /// Retrieves the form state.
        /// </summary>
        /// <param name="id">The id of the form state to retrieve.</param>
        /// <returns>Form state.</returns>
        FormState Retrieve(string id);

        /// <summary>
        /// Deletes the stored form state.
        /// </summary>
        /// <param name="id">The id of the form state to delete.</param>
        void Delete(string id);
    }
}
